-- GENERATED SPELL FOR [Hellfire Warder] --


function spell0_18829(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(34437,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18829', 3273, 1)
end

function spell1_18829(pUnit, Event) --@Rain of Fire,n/a--
pUnit:FullCastSpellOnTarget(34435,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18829', 6000, 1)
end

function spell2_18829(pUnit, Event) --@Shadow Bolt Volley,Self--
pUnit:FullCastSpellOnTarget(39175,pUnit)
pUnit:RegisterEvent('Sorts_18829', 2000, 1)
end

function spell3_18829(pUnit, Event) --@Shadow Burst,Self--
pUnit:FullCastSpellOnTarget(34436,pUnit)
pUnit:RegisterEvent('Sorts_18829', 584, 1)
end

function spell4_18829(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(34441,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18829', 18000, 1)
end

function spell5_18829(pUnit, Event) --@Unstable Affliction,n/a--
pUnit:FullCastSpellOnTarget(34439,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18829', 18000, 1)
end

function Sorts_18829(pUnit, Event)
local choix_sorts_18829 = math.random(0, 5)
if choix_sorts_18829 == 0 then
pUnit:RegisterEvent('spell0_18829', 1, 1)
end
if choix_sorts_18829 == 1 then
pUnit:RegisterEvent('spell1_18829', 1, 1)
end
if choix_sorts_18829 == 2 then
pUnit:RegisterEvent('spell2_18829', 1, 1)
end
if choix_sorts_18829 == 3 then
pUnit:RegisterEvent('spell3_18829', 1, 1)
end
if choix_sorts_18829 == 4 then
pUnit:RegisterEvent('spell4_18829', 1, 1)
end
if choix_sorts_18829 == 5 then
pUnit:RegisterEvent('spell5_18829', 1, 1)
end
end

function mob18829_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18829', math.random(1500, 3000), 1)
end

function mob18829_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18829_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18829_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18829, 1, 'mob18829_Action')
RegisterUnitEvent(18829, 2, 'mob18829_Leave')
RegisterUnitEvent(18829, 3, 'mob18829_Kill')
RegisterUnitEvent(18829, 4, 'mob18829_Die')
